#!/sbin/openrc-run

depend() {
	need net
	provide jabber-server
}

start() {
	ebegin "Starting Openfire Server"
	start-stop-daemon \
		--user openfire \
		--background \
		--make-pidfile \
		--pidfile /run/openfire.pid \
		--start \
		--exec $OPENFIRE_CMD -- $OPENFIRE_ARGS > /var/log/openfire.log 2>&1
	eend
}

stop() {
	ebegin "Stopping Openfire Server"
	start-stop-daemon --pidfile /run/openfire.pid --stop
	eend
}
